package com.duguo.dynamicmvc.factory.processor.controller;

import java.util.List;
import java.util.Map;

import javassist.CtClass;
import javassist.CtMethod;

import com.duguo.dynamicmvc.factory.ControllerBuilder;
import com.duguo.dynamicmvc.factory.ControllerFactory;
import com.duguo.dynamicmvc.factory.WorkingModel;

public interface ControllerProcessor {
	
	public CtClass getViewCtClass()  throws Exception;

    public List<CtMethod> getControllerMethods(CtClass controllerCtClass) throws Exception ;

    public CtMethod findDynamicMethod(CtClass controllerCtClass) throws Exception;
    
    public ControllerMultiActionCreator getControllerMultiActionCreator();

	public void setupDynamicControllerName(WorkingModel workingModel)throws Exception;
	
	public void setupMultiActionControllerCtClass(CtClass controllerCtClass, CtMethod controllerHandlerCtMethod, boolean hasDynamicController, Map<String,Object> viewMappings, CtClass controllerInternalInterface, boolean isSingleAction, ControllerBuilder controllerBuilder) throws Exception;

	public void setupDynamicControllerParentHandler(CtClass controllerCtClass, CtClass parentInternalInterfaceCtClass, CtMethod parentHandlerCtMethod) throws Exception;

	public void createInternalMethodControllerHandlerMethod(WorkingModel workingModel, CtClass internalControllerClass, CtMethod controllerMethodCtMethod, ControllerBuilder controllerBuilder) throws Exception;

	
	public void setupControllerClass(WorkingModel workingModel) throws Exception;
	
	public ControllerFactory getParentControllerFactory(WorkingModel workingModel);
	
	public ControllerNameBuilder getControllerNameBuilder();

	public void injectionFeilds(Object controllerInstance) throws Exception;

	public void setupInjectionFeilds(CtClass controllerCtClass) throws Exception;

    
}
